﻿<UserControl x:Class="ScrumFactory.Backlog.SprintGrid"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:system="clr-namespace:System;assembly=mscorlib"
             xmlns:props="clr-namespace:ScrumFactory.Backlog.Properties"
             xmlns:SF="clr-namespace:ScrumFactory;assembly=ScrumFactory"   
             xmlns:SF_Comp="clr-namespace:ScrumFactory.Composition;assembly=ScrumFactory.Composition"                             
             xmlns:SF_Adorners="clr-namespace:ScrumFactory.Windows.Helpers.Adorners;assembly=ScrumFactory.Windows.Helpers"
             xmlns:SF_Helpers="clr-namespace:ScrumFactory.Windows.Helpers;assembly=ScrumFactory.Windows.Helpers"
             xmlns:SF_DD="clr-namespace:ScrumFactory.Windows.Helpers.DragDrop;assembly=ScrumFactory.Windows.Helpers"
             xmlns:SF_Converters="clr-namespace:ScrumFactory.Windows.Helpers.Converters;assembly=ScrumFactory.Windows.Helpers"
             
             x:Name="thisView"
             
             Background="Transparent"
             HorizontalAlignment="Stretch"
             
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <UserControl.Resources>




        <Style x:Key="SprintHeaderBorder" TargetType="{x:Type Border}">
            <Setter Property="Border.CornerRadius" Value="0"/>
            <Setter Property="Border.BorderThickness" Value="0"/>
            <Setter Property="Border.Margin" Value="0,0,0,0"/>
            <Setter Property="Border.Padding" Value="3"/>
            <Setter Property="Border.Width" Value="120"/>

            <Setter Property="Border.Background" Value="#FAFAFA"/>

        </Style>

        <Style x:Key="SprintHeaderExpander" TargetType="{x:Type Expander}">
            <Setter Property="Border.Margin" Value="0,0,5,0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Expander}">
                        <StackPanel Orientation="Vertical" Background="Transparent">
                            <ToggleButton               
                                x:Name="toggle"
                                VerticalAlignment="Top" Cursor="Hand"                               
                                IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                                <ToggleButton.Template>
                                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                                        <TextBlock x:Name="toggleText" Style="{StaticResource HyperLinkTextBlock}" FontSize="{StaticResource SmallFontSize}" />
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="IsChecked" Value="True">
                                                <Setter TargetName="toggleText" Property="Text" Value="{x:Static props:Resources.hide}"/>
                                            </Trigger>
                                            <Trigger Property="IsChecked" Value="False">
                                                <Setter TargetName="toggleText" Property="Text" Value="{x:Static props:Resources.show}"/>
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </ToggleButton.Template>
                            </ToggleButton>
                            <ContentPresenter x:Name="Content"/>
                        </StackPanel>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="toggle" Property="Visibility" Value="Visible" />
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="False">
                                <Setter TargetName="toggle" Property="Visibility" Value="Hidden" />
                            </Trigger>
                            <Trigger Property="IsExpanded" Value="True">
                                <Setter TargetName="Content" Property="Visibility" Value="Visible" />
                            </Trigger>
                            <Trigger Property="IsExpanded" Value="False">
                                <Setter TargetName="Content" Property="Visibility" Value="Collapsed" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="SprintDatePicker" TargetType="{x:Type Calendar}">
           
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Calendar}">
                        <Grid >

                            <ToggleButton x:Name="openButton" Margin="0" >
                                <ToggleButton.Template>
                                    <ControlTemplate>
                                        <TextBlock
                                            Cursor="Hand"                                       
                                            Foreground="{StaticResource LinkBrush}"
                                            FontWeight="{TemplateBinding FontWeight}" FontSize="{TemplateBinding FontSize}" FontFamily="Segoe UI"
                                            Text="{Binding ElementName=calendar, Path=SelectedDate, StringFormat='{}{0:d MMM}'}">
                                            <TextBlock.Style>
                                                <Style>
                                                    <Style.Triggers>
                                                        <Trigger Property="TextBlock.IsMouseOver" Value="True">
                                                            <Setter Property="TextBlock.TextDecorations" Value="underline"/>
                                                        </Trigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </TextBlock.Style>
                                        </TextBlock>

                                    </ControlTemplate>
                                </ToggleButton.Template>
                            </ToggleButton>
                            <Popup x:Name="popup" AllowsTransparency="True" IsOpen="{Binding ElementName=openButton, Path=IsChecked}" VerticalOffset="-15">
                                <Grid Background="#01000000">
                                    <Calendar x:Name="calendar"      
                                          VerticalAlignment="Top" Margin="0,15,0,0" 
                                          CalendarDayButtonStyle="{StaticResource CalendarDayButtonStyle}"       
                                          SelectedDate="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=SelectedDate}"
                                          DisplayDate="{TemplateBinding DisplayDate}"
                                          DisplayDateStart="{TemplateBinding DisplayDateStart}"
                                          DisplayDateEnd="{TemplateBinding DisplayDateEnd}">
                                        <Calendar.Triggers>
                                            <EventTrigger RoutedEvent="Calendar.SelectedDatesChanged">
                                                <EventTrigger.Actions>
                                                    <BeginStoryboard>
                                                        <Storyboard>
                                                            <ObjectAnimationUsingKeyFrames 
                                                                        Storyboard.TargetName="openButton"
                                                                        Storyboard.TargetProperty="IsChecked">
                                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                                    <DiscreteObjectKeyFrame.Value>
                                                                        <system:Boolean>False</system:Boolean>
                                                                    </DiscreteObjectKeyFrame.Value>
                                                                </DiscreteObjectKeyFrame>
                                                            </ObjectAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </BeginStoryboard>
                                                </EventTrigger.Actions>
                                            </EventTrigger>
                                        </Calendar.Triggers>
                                    </Calendar>
                                </Grid>
                              
                            </Popup>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <EventTrigger RoutedEvent="Calendar.MouseLeave">
                                <EventTrigger.Actions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames 
                                                                        Storyboard.TargetName="openButton"
                                                                        Storyboard.TargetProperty="IsChecked">
                                                <DiscreteObjectKeyFrame KeyTime="00:00:01">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <system:Boolean>False</system:Boolean>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </EventTrigger.Actions>
                            </EventTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <DataTemplate x:Key="BacklogItemDataTemplate">

            <StackPanel Orientation="Vertical">
                <SF_Adorners:SurroundBorderAdorner
                    Background="{Binding Group.GroupColor}"
                    BorderBrush="LightGray"
                    AdornerLayerElement="{Binding ElementName=sprintPlansListBox}"
                    x:Name="itemBorder"
                   
                    Cursor="Hand"                                         
                    Width="115"                  
                    Margin="2,0,2,0"                   
                    ToolTipService.InitialShowDelay="0"
                    ToolTipService.BetweenShowDelay="0"
                    ToolTipService.Placement="MousePoint" 
                    Height="{Binding ItemPixelHeight}"
                    CornerRadius="3" BorderThickness="2" Padding="0">
                    <SF_Adorners:SurroundBorderAdorner.LeftControl>
                        <Border DataContext="{Binding ElementName=itemBorder, Path=DataContext}" Background="Transparent" Margin="0,0,-10,0" MinHeight="32">
                            <Button                                
                                Style="{StaticResource MoveItemLeftButton}"
                                VerticalAlignment="Center"                                           
                                Command="{Binding MoveItemToPreviousSprintCommand}" />
                        </Border>
                    </SF_Adorners:SurroundBorderAdorner.LeftControl>
                    <SF_Adorners:SurroundBorderAdorner.RightControl>
                        <Border DataContext="{Binding ElementName=itemBorder, Path=DataContext}" Background="Transparent" Margin="-10,0,0,0" MinHeight="32">
                            <Button                                
                                Style="{StaticResource MoveItemRightButton}"
                                VerticalAlignment="Center"                                                       
                                Command="{Binding MoveItemToNextSprintCommand}"/>

                        </Border>
                    </SF_Adorners:SurroundBorderAdorner.RightControl>
                    <SF_Adorners:SurroundBorderAdorner.ToolTip>
                        <TextBlock>                            
                            <Run Text="{Binding Item.BacklogItemNumber, StringFormat='{}[{0}]'}" FontWeight="Bold"/>
                            <Run Text="{Binding Item.Name}" FontWeight="Bold"/>               
                            <LineBreak/>
                           
                            <Run Text="{Binding ConfigSize, Mode=OneWay}"/><Run Text="{Binding DataContext.ConfigUnit, ElementName=thisView, Mode=OneWay, StringFormat='{} {0}'}"/>
                        </TextBlock>
                    </SF_Adorners:SurroundBorderAdorner.ToolTip>
                    <DockPanel Margin="0">
                        <TextBlock                 
                            Background="{Binding Group.GroupColor}"
                            Style="{StaticResource BacklogItemGroupTextBlock}"
                            DockPanel.Dock="Top"                                       
                            FontSize="{StaticResource TinyFontSize}" Padding="1" Margin="0,0,0,0" VerticalAlignment="Center"
                            TextWrapping="Wrap"
                            LineHeight="14"
                            Text="{Binding Item.Name}"                                                            
                            TextTrimming="CharacterEllipsis"/>
                        <TextBlock                 
                            Background="{Binding Group.GroupColor}"
                            Style="{StaticResource BacklogItemGroupTextBlock}"
                            DockPanel.Dock="Bottom"
                            HorizontalAlignment="Right" VerticalAlignment="Bottom"
                            FontSize="{StaticResource TinyFontSize}" Padding="1,0,1,0">
                             <TextBlock Text="{Binding ConfigSize, Mode=OneWay}"/><Run Text="{Binding DataContext.ConfigUnit, ElementName=thisView, Mode=OneWay, StringFormat='{} {0}'}"/>
                        </TextBlock>

                    </DockPanel>

                </SF_Adorners:SurroundBorderAdorner>
                <Button Command="{Binding DataContext.ShiftItemsCommand, ElementName=thisView}" CommandParameter="{Binding Item}">
                    <Button.Style>
                        <Style TargetType="Button" BasedOn="{StaticResource CleanButton}">
                            <Setter Property="Button.Height" Value="4"/>
                            <Setter Property="Content" Value="{x:Null}"/>
                            <Style.Triggers>
                                <Trigger Property="Button.IsMouseOver" Value="True">
                                    <Setter Property="Button.Height" Value="15"/>
                                    <Setter Property="Button.Content">
                                        <Setter.Value>
                                            <Grid HorizontalAlignment="Stretch">
                                                <Rectangle HorizontalAlignment="Stretch" Height="2" Stroke="Gray" StrokeDashArray="3,3" StrokeThickness="2" />
                                                <TextBlock Text="{x:Static props:Resources.Break}" Background="White" FontSize="{StaticResource TinyFontSize}" TextAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,0" Foreground="Gray"/>
                                            </Grid>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="Button.IsEnabled" Value="False">
                                    <Setter Property="Button.Visibility" Value="Hidden"/>
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </Button.Style>
                </Button>
            </StackPanel>






        </DataTemplate>

    </UserControl.Resources>
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

        <Grid x:Name="sprintGrid" >
           
            <Grid.Style>
                <Style TargetType="Grid">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Project.IsTicketProject}" Value="True">
                            <Setter Property="Visibility" Value="Collapsed"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Grid.Style>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>


            <StackPanel Orientation="Vertical" Margin="0,0,6,0" Grid.Column="0">


                <TextBlock 
                    Foreground="{StaticResource TitleTextBrush}"
                    FontWeight="Bold" Width="120" Height="80"
                    TextWrapping="Wrap" VerticalAlignment="Center"
                    Text="{x:Static props:Resources.Previous_sprint_items}"/>

                <ListBox
                            x:Name="notFinishedItemsListBox"
                            BorderThickness="0"
                            Background="Transparent"    
                            ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            ItemContainerStyle="{StaticResource NoHoverListBoxItem}"
                            ItemTemplate="{StaticResource BacklogItemDataTemplate}"
                            ItemsSource="{Binding LateItemsSprint.PlannedItems}"
                            SF_DD:DragDropHelper.IsDragSource="True"   
                            SF_DD:DragDropHelper.OnDropCommand="{Binding ElementName=thisView, Path=DataContext.MoveItemToCommand}"                                            
                            SF_DD:DragDropHelper.IsDropTarget="True"                    
                            SF_DD:DragDropHelper.DragDropTemplate="{StaticResource BacklogItemDataTemplate}"/>

                <StackPanel.Style>
                    <Style>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding ElementName=notFinishedItemsListBox, Path=HasItems}" Value="False">
                                <Setter Property="StackPanel.Visibility" Value="Collapsed"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </StackPanel.Style>


            </StackPanel>

            <ListBox        
            x:Name="sprintPlansListBox"
            Margin="0,0,0,20"
            Grid.Column="1"
                                               
            ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
            ItemContainerStyle="{StaticResource NoHoverListBoxItem}"
            BorderThickness="0"                                
            ItemsSource="{Binding SprintPlans}">

                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Expander IsExpanded="True" Style="{StaticResource SprintHeaderExpander}" >

                            <StackPanel Orientation="Vertical" >

                                <Border Style="{StaticResource SprintHeaderBorder}">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition />
                                            <ColumnDefinition />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="auto" />
                                            <RowDefinition Height="auto"/>
                                            <RowDefinition Height="auto"/>
                                        </Grid.RowDefinitions>


                                        <TextBlock                                  
                                        Grid.ColumnSpan="2" Grid.RowSpan="3"
                                        FontSize="54" FontWeight="Bold" Opacity="0.5"
                                        Foreground="LightGray" HorizontalAlignment="Center" VerticalAlignment="Center"                                                                                      
                                    Text="{Binding Sprint.SprintNumber}"/>

                                        <TextBlock 
                                Grid.Row="2" Grid.ColumnSpan="2"
                                FontStyle="Italic" FontSize="{StaticResource SmallFontSize}" HorizontalAlignment="Right"
                                Foreground="Black" Margin="0,0,0,0" VerticalAlignment="Bottom"  >
                                <TextBlock Text="{Binding ConfigTotal, Mode=OneWay}"/>
                                <Run Text="{Binding DataContext.ConfigUnit, ElementName=thisView, Mode=OneWay, StringFormat='{} {0}'}"/>
                                <Run Text=","/>
                                <Run Text="{Binding WorkDayCount, Mode=OneWay, StringFormat={x:Static props:Resources.N_days}}"/>
                                    </TextBlock>

                                        <Image                                                                          
                                Grid.Row="1" Grid.ColumnSpan="2"
                                Source="/Images/Toolbar/teamMemberMeter.png"
                                Stretch="None"                                            
                                Height="16" HorizontalAlignment="Right" MaxWidth="128" Margin="0,8,0,5"
                                Width="{Binding NumberOfMembersNeededForDoItInPixels}">
                                            <Image.ToolTip>
                                                <TextBlock Text="{Binding NumberOfMembersNeededForDoIt, StringFormat={x:Static props:Resources.You_will_need_N_guys_to_perform_this_sprint}}" />
                                            </Image.ToolTip>
                                        </Image>

                                        <Calendar 
                                Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"
                                DisplayDate="{Binding Sprint.StartDate, Mode=OneTime}"
                                FontSize="{StaticResource SmallFontSize}" FontWeight="Normal"
                                SelectedDate="{Binding SprintStartDate, UpdateSourceTrigger=PropertyChanged}">
                                            <Calendar.Style>
                                                <Style BasedOn="{StaticResource SprintDatePicker}" TargetType="{x:Type Calendar}">
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding ElementName=thisView, Path=DataContext.UserCannotEdit}" Value="True">
                                                            <Setter Property="IsEnabled" Value="False"/>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Calendar.Style>
                                        </Calendar>

                                        <Calendar
                                Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center"
                                DisplayDate="{Binding Sprint.EndDate, Mode=OneTime}"
                                DisplayDateStart="{Binding Sprint.StartDate, Mode=OneTime}"              
                                FontSize="{StaticResource BigFontSize}" FontWeight="Bold"
                                SelectedDate="{Binding SprintEndDate, UpdateSourceTrigger=PropertyChanged}">
                                            <Calendar.Style>
                                                <Style BasedOn="{StaticResource SprintDatePicker}" TargetType="{x:Type Calendar}">
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding ElementName=thisView, Path=DataContext.UserCannotEdit}" Value="True">
                                                            <Setter Property="IsEnabled" Value="False"/>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Calendar.Style>
                                        </Calendar>



                                        <DockPanel Grid.ColumnSpan="2" Grid.RowSpan="3" HorizontalAlignment="Right" VerticalAlignment="Bottom">
                                            <Button                                                                                     
                                                        Style="{StaticResource RemoveActionButton}"                                             
                                                        Command="{Binding ElementName=thisView, Path=DataContext.RemoveSprintCommand}"
                                                        CommandParameter="{Binding .}"/>
                                            <DockPanel.Style>
                                                <Style>
                                                    <Setter Property="DockPanel.Visibility" Value="Collapsed"/>
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource AncestorType={x:Type Border}}}" Value="True">
                                                            <Setter Property="DockPanel.Visibility" Value="Visible"/>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </DockPanel.Style>
                                        </DockPanel>

                                    </Grid>

                                </Border>

                                <Grid VerticalAlignment="Top" Margin="0,3,0,0">
                                    <Rectangle
                                                HorizontalAlignment="Stretch" 
                                                Stroke="Gray" StrokeDashArray="3,3" StrokeThickness="2" RadiusX="3" RadiusY="3"/>


                                    <TextBlock 
                                                    Text="{x:Static props:Resources.Drop_items_here}" 
                                                    TextWrapping="Wrap" TextAlignment="Center"
                                                    VerticalAlignment="Center" HorizontalAlignment="Center"
                                                    Width="80" Foreground="LightGray" Margin="5">
                                                    <TextBlock.Style>
                                                        <Style>
                                                            <Setter Property="TextBlock.Visibility" Value="Collapsed"/>
                                                            <Style.Triggers>
                                                                <DataTrigger Binding="{Binding Items.Count, ElementName=sprintList}" Value="0">
                                                                    <Setter Property="TextBlock.Visibility" Value="Visible"/>
                                                                </DataTrigger>
                                                            </Style.Triggers>
                                                        </Style>
                                                    </TextBlock.Style>
                                    </TextBlock>


                                    <ListBox
                                                ClipToBounds="False"
                                                x:Name="sprintList"
                                                BorderThickness="0"      
                                                Margin="0,2,0,2"                               
                                                Background="Transparent" VerticalAlignment="Stretch"
                                                
                                                ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                        
                                                SF_DD:DragDropHelper.OnDropCommand="{Binding ElementName=thisView, Path=DataContext.MoveItemToCommand}"                                            
                                                SF_DD:DragDropHelper.IsDropTarget="True"
                                                SF_DD:DragDropHelper.DragDropTemplate="{StaticResource BacklogItemDataTemplate}"
                                            
                                                Tag="{Binding Sprint.SprintNumber}"
                                                
                                                SF_Helpers:ItemActivation.ActivationMode="Both"
                                                SF_Helpers:ItemActivation.TheCommandToRun="{Binding DataContext.ShowDetailCommand, ElementName=thisView}"
                                                                                        
                                                ItemTemplate="{StaticResource BacklogItemDataTemplate}"
                                                ItemsSource="{Binding PlannedItems}">
                                        <ListBox.ItemContainerStyle>
                                            <Style BasedOn="{StaticResource NoHoverListBoxItem}" TargetType="{x:Type ListBoxItem}">
                                                <Setter Property="SF_DD:DragDropHelper.IsDragAllowed" Value="{Binding IsDevelopmentItem}"/>
                                            </Style>
                                        </ListBox.ItemContainerStyle>
                                        <ListBox.Style>
                                            <Style>
                                                <Setter Property="SF_DD:DragDropHelper.IsDragSource" Value="True"/>
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding ElementName=thisView, Path=DataContext.UserCannotEdit}" Value="True">
                                                        <Setter Property="SF_DD:DragDropHelper.IsDragSource" Value="False"/>
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </ListBox.Style>
                                    </ListBox>




                                </Grid>

                            </StackPanel>

                        </Expander>

                    </DataTemplate>
                </ListBox.ItemTemplate>
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
            </ListBox>

            <ContentControl Grid.ColumnSpan="2" Grid.Row="0"                                            
                        Style="{StaticResource LoadingAnimationContent}"/>


        </Grid>

      
    </Grid>
</UserControl>
